package com.cskaoyan.javase.oop2._1extend._9final._3variable._4reference;

/**
 * @description: final修饰引用数据类型
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

public class Demo {
    public static void main(String[] args) {
        final A a = new A(18);
        //a = new A();
        a.a = 20;

        //final修饰匿名对象,语法不支持
        //final new A();
    }
}

class A {
    int a;

    public A() {
    }

    public A(int a) {
        this.a = a;
    }
}
